package com.gsn.poker.game;

import org.json.JSONObject;

import com.gsn.desktop.engine.IChatInput;
import com.gsn.desktop.engine.IDowloader;
import com.gsn.engine.mercurry.MercuryClient;
import com.gsn.engine.mercurry.MercuryClient.IMercuryListener;

public class MyPoker {
	public static PokerGame game = null;
	public static MercuryClient client;
	public static String server = "120.138.65.103"; // private

	// public static String server = "118.102.3.8"; // public
	public static IChatInput chatInput;

	final public static IMercuryListener tableListener = new MercuryClient.IMercuryListener() {

		@Override
		public void onReceivedJson(JSONObject json) {
			// TODO Auto-generated method stub
			try {
				int cmd = json.getInt("cmdID");
				switch (cmd) {
				// case 203:
				// PokerConfigModel.executeUpdate(json);
				// break;
				// case 213:
				// PokerConfigModel.executeRefresh(json);
				// break;
				}
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}

		@Override
		public void onReceived(String s) {
			// TODO Auto-generated method stub

		}

		@Override
		public void onException(Exception ex) {
			// TODO Auto-generated method stub

		}

		@Override
		public void onDisconnected() {
			// TODO Auto-generated method stub

		}

		@Override
		public void onConnected() {
			// TODO Auto-generated method stub

		}
	};
}
